Skip to content

fix(vrl): restore stdlib functions in CLI and playground#25310

Open
pront wants to merge 1 commit intomasterfrom
codex/fix-vrl-get-env-var-stdlib
Open

fix(vrl): restore stdlib functions in CLI and playground#25310
pront wants to merge 1 commit intomasterfrom
codex/fix-vrl-get-env-var-stdlib

Conversation

@pront
Copy link
Copy Markdown
Member

@pront pront commented Apr 27, 2026

Summary

  • Restore the full VRL stdlib by default for the standalone VRL CLI and web playground.
  • Enable that default directly with default = ["vrl/stdlib"] in both standalone crates.
  • Preserve --no-default-features as the restricted build path for library consumers that intentionally avoid the full stdlib.

Root Cause

After the VRL feature split, the standalone VRL crates inherited the workspace vrl dependency with stdlib-base only. That unintentionally changed the default behavior for the standalone VRL CLI and web playground: functions from the full stdlib, such as get_env_var, were no longer available unless the build explicitly enabled vrl/stdlib.

Production Vector already enables vrl/stdlib through the root base feature. This change aligns the standalone CLI and web playground with that default production behavior, while consumers embedding Vector crates with default-features = false still do not enable the full stdlib unless they opt in.

Fixes #25267.

Validation

  • Reproduced the get_env_var undefined-function error on v0.55.0 before the fix.
  • cargo run -q -p vector-vrl-cli -- -q '.xxx = get_env_var("NODE_NAME") ?? "no_host"'
  • cargo run -q -p vector-vrl-cli --no-default-features -- -q '.xxx = get_env_var("NODE_NAME") ?? "no_host"' still fails with E105
  • cargo check -q -p vector-vrl-cli
  • cargo check -q -p vector-vrl-web-playground
  • cargo check -q -p vector-vrl-web-playground --no-default-features
  • ./scripts/check_changelog_fragments.sh
  • make check-clippy

@pront pront changed the title [codex] Fix VRL stdlib functions in standalone playgrounds fix(vrl): VRL stdlib functions in standalone playgrounds Apr 27, 2026
@pront pront changed the title fix(vrl): VRL stdlib functions in standalone playgrounds fix(vrl): enable VRL stdlib functions in standalone playgrounds Apr 27, 2026
@pront pront marked this pull request as ready for review April 27, 2026 19:34
@pront pront requested a review from a team as a code owner April 27, 2026 19:34
@pront pront marked this pull request as draft April 27, 2026 19:40
@pront pront force-pushed the codex/fix-vrl-get-env-var-stdlib branch from 4e77757 to 7d73bfc Compare April 27, 2026 19:49
@github-actions github-actions Bot added the domain: ci Anything related to Vector's CI environment label Apr 27, 2026
@pront pront changed the title fix(vrl): enable VRL stdlib functions in standalone playgrounds fix(vrl): gate unsafe stdlib functions in playgrounds Apr 27, 2026
@pront pront force-pushed the codex/fix-vrl-get-env-var-stdlib branch from 7d73bfc to 3bff37b Compare April 27, 2026 19:55
@pront pront changed the title fix(vrl): gate unsafe stdlib functions in playgrounds fix(vrl): add stdlib functions opt-in for playgrounds Apr 27, 2026
@pront pront force-pushed the codex/fix-vrl-get-env-var-stdlib branch from 3bff37b to 635b285 Compare April 27, 2026 20:02
@github-actions github-actions Bot removed the domain: ci Anything related to Vector's CI environment label Apr 27, 2026
@pront pront changed the title fix(vrl): add stdlib functions opt-in for playgrounds fix(vrl): restore stdlib functions in CLI and playground Apr 27, 2026
@pront pront force-pushed the codex/fix-vrl-get-env-var-stdlib branch from 635b285 to 0ca17c5 Compare April 27, 2026 20:23
@pront pront marked this pull request as ready for review April 27, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.55.0 get_env_var undefined function

2 participants